Page({
  data: {
    inp:'',
    name:''
  },
  //事件监听函数
  // handlerInput:function(event){
  //     console.log("在输入内容.....");
  //     // console.log(event);
  //     // let {detail} = event;
  //     let detail  = event.detail;
  //     console.log("detail.value: "+detail.value)

  // }

  handlerInput:(event)=>{
      console.log("在输入内容.....");
      console.log(event);
      // let {detail} = event;
      let detail  = event.detail;
      let {name,age}  = event.target.dataset;
      console.log("detail.value: "+detail.value)
      console.log("name "+name)
      console.log("age "+age)
  },
  changeNames:function(event){
      //修改内存中的name的值
      // this.name =   vuejs的写法 

     //小程序的写法
      this.setData({'name':'按钮被点击了'+Math.random()})
  },
  changeName(event){
    let name = event.detail.value;
    this.setData({name});
    // this.setData({name:name});
  }


})